1. Field of the Invention
The system and method of the present invention relates to the protection of memory from unauthorized access with no performance penalty. More particularly, the system and method of the present invention relates to the protection of memory in a non-virtual memory based system, such as embedded controllers.
2. Art Background
As the sophistication of computer processors and controllers increases so does the software to operate the processors and controllers. To program the processors and controllers today requires typically a group of programmers to develop the code to operate the processor or controller. Typically, a team of programmers will work on development concurrently on different portions of the code. Mistakes typically occur during development, as well as conflicts of memory usage. Therefore, it is desirable to be able to flexibly protect specific areas of memory. For example, if a certain portion of the code has been tested and proven to be running accurately, it may be desirable to protect that code from any further modification, deliberately or inadvertently. Further, it is desirable to protect certain areas of memory used by certain portions used by the code from access by other portions of the code to minimize errors during development.
In a microprocessor based system having virtual memory, the memory management unit (MMU) not only provides the function of mapping virtual memory accesses to physical memory accesses but also performs a check of the protection on the different portions of the memory. Therefore, certain portions of the memory can be specified as protected against certain accesses, for example, certain processes cannot access certain portions of memory.
However, the MMU incurs significant overhead for each access as the process of performing a virtual to physical address translation is quite time consuming. This penalty is acceptable for the benefit of providing virtual memory access. Embedded controllers, or microprocessors, however, do not require the flexibility of virtual addressing as the application the controller/microprocessor performs is very specific and is typically not changed in a manner that requires the flexibility of virtual addressing. The embedded controllers and microprocessors are coded during development using physical addresses as this is much quicker and less hardware and software overhead is required.
Therefore not all microprocessors and controllers include an MMU as virtual addressing is not performed and these microprocessors/controllers do not provide for a memory protect mechanism. Further, as the code required to operate the controllers/microprocessors has become more and more complex, requiring more and more programmers to develop the code, the need to provide some form of a protection mechanism has become apparent. In addition, it is desirable that the protection mechanism does not cause the processor to lose performance or incur any overhead in providing this protection mechanism.